<!--
 * @Author: daidai
 * @Date: 2022-03-01 09:43:37
 * @LastEditors: sunliq sunliq@chanjet.com
 * @LastEditTime: 2023-06-26 22:51:23
 * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-bottom.vue
-->
<template>
  <div class="left_bottom_wrap"  v-if="pageflag">
    <div class="desc mt-10 mb-10">2023年用水指标</div>
    <div class="list">
      <div class="item">
        <div class="desc">农业用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">工业用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">生态用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">生活用水</div>
        <div class="num">31334</div>
      </div>
    </div>

    <div class="desc mt-10 mb-10">2023年实际用水量</div>
    <div class="list">
      <div class="item">
        <div class="desc">农业用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">工业用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">生态用水</div>
        <div class="num">31334</div>
      </div>
      <div class="item">
        <div class="desc">生活用水</div>
        <div class="num">31334</div>
      </div>
    </div>


</div>

  <Reacquire v-else @onclick="getData" style="line-height: 200px" />
</template>

<script>
import { currentGET } from "api";
import vueSeamlessScroll from "vue-seamless-scroll"; // vue2引入方式
import Kong from "../../components/kong.vue";
export default {
  components: { vueSeamlessScroll, Kong },
  data() {
    return {
      list: [{
        title: ''
      }],
      pageflag: true,
      components: vueSeamlessScroll,
      defaultOption: {
        ...this.$store.state.setting.defaultOption,
        singleHeight: 240,
        limitMoveNum: 5, 
        step: 0,
      },
    };
  },
  computed: {
    sbtxSwiperFlag() {
      let sbtxSwiper = this.$store.state.setting.sbtxSwiper;
      if (sbtxSwiper) {
        this.components = vueSeamlessScroll;
      } else {
        this.components = Kong;
      }
      return sbtxSwiper;
    },
  },
  created() {
    
  },

  mounted() {
    this.getData();
  },
  methods: {
    addressHandle(item) {
      let name = item.provinceName;
      if (item.cityName) {
        name += "/" + item.cityName;
        if (item.countyName) {
          name += "/" + item.countyName;
        }
      }
      return name;
    },
    getData() {
      this.pageflag = true;
      // this.pageflag =false
      currentGET("big3", { limitNum: 20 }).then((res) => {
        console.log("设备提醒", res);
        if (res.success) {
          this.countUserNumData = res.data;
          this.list = res.data.list;
          let timer = setTimeout(() => {
            clearTimeout(timer);
            this.defaultOption.step =
              this.$store.state.setting.defaultOption.step;
          }, this.$store.state.setting.defaultOption.waitTime);
        } else {
          this.pageflag = false;
          this.$Message({
            text: res.msg,
            type: "warning",
          });
        }
      });
    },
  },
};
</script>
<style lang='scss' scoped>
.left_bottom_wrap {
  overflow: hidden;
  width: 100%;
  height:100%;
  .list {
    display: flex;
    padding: 0 10px;
    .item {
      height: 90px;
      flex: 1;
      margin: 0 10px;
      background: url('../../assets/img/left-bottom-bg.svg') center center no-repeat;
      background-size: 100% 100%;
      .desc {
        text-align: center;
        font-family: '微软雅黑', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    margin-top: 26px;
    margin-bottom:6px
      }
      .num {
        text-align: center;
        font-family: 'DIN ', 'DIN', sans-serif;
    font-weight: 700;
    font-style: normal;
    color: rgb(255, 255, 255);
    font-size: 28px;
      }
    }
  }
}
.desc {
  padding: 0 10px;
  font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
}

.mt-10 {
  margin-top:10px
}

.mb-10 {
  margin-bottom:10px
}
.mb-5 {
  margin-bottom:5px
}

.doudong {
  //  vertical-align:middle;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.left_boottom {
  width: 100%;
  height: 100%;

  .left_boottom_item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 14px;
    margin: 0 0 20px 0;
    .dibu {
        position: absolute;
        height: 2px;
    width: 95%;
        background-image: url("../../assets/img/zuo_xuxian.png");
        bottom: -12px;
    left: 24px;
    background-size: cover;
      }
    .orderNum {
      margin: 0 16px 0 -20px;
    }

    .info {
      margin-right: 10px;
      display: flex;
      align-items: center;
      color: #fff;

      .labels {
        flex-shrink: 0;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
      }

      .zhuyao {
        color: $primary-color;
        font-size: 15px;
      }

      .ciyao {
        color: rgba(255, 255, 255, 0.8);
      }

      .warning {
        color: #e6a23c;
        font-size: 15px;
      }
    }

    .inner_right {
      position: relative;
      height: 100%;
      width: 380px;
      flex-shrink: 0;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      .dibu {
        position: absolute;
        height: 2px;
        width: 104%;
        background-image: url("../../assets/img/zuo_xuxian.png");
        bottom: -10px;
        left: -2%;
        background-size: cover;
      }
      .addresswrap {
        width: 100%;
        display: flex;
        margin-top: 8px;
      }
    }

    .wangguan {
      color: #1890ff;
      font-weight: 900;
      font-size: 15px;
      width: 80px;
      flex-shrink: 0;
    }


    .time {
      font-size: 12px;
      // color: rgba(211, 210, 210,.8);
      color: #fff;
    }

    .address {
      font-size: 12px;
      cursor: pointer;
      // @include text-overflow(1);
    }

    .types {
      width: 30px;
      flex-shrink: 0;
    }

    .typeRed {
      color: #fc1a1a;
    }

    .typeGreen {
      color: #29fc29;
    }
  }
}
</style>